#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:do1多进程.py
# author: 马国鑫
# datetime:2022/3/26 17:14
# software: PyCharm

"""
this is function  description 
"""

# import module your need
import time
import multiprocessing


def dance():
    for i in range(5):
        time.sleep(1)
        print('跳舞', i)


def sing():
    for i in range(5):
        time.sleep(1)
        print('唱歌', i)


if __name__ == '__main__':
    # 创建子进程
    # target放入自己选择的函数
    my_dance = multiprocessing.Process(target=dance)
    my_sing = multiprocessing.Process(target=sing)
    # 开启线程
    my_dance.start()
    my_sing.start()
